package locationServices;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;

import android.location.Location;
import android.location.LocationListener;
import android.os.Bundle;

public class MyLocationListener implements LocationListener {  
  
    public static double Latitude;  
    public static double Longitude;  
    public static double Altitude;  
    public static double Speed;  
  
    
    @Override  
    public void onLocationChanged(Location loc)  
    {  
  
    	loc.getLatitude();  
        loc.getLongitude();
        loc.getAltitude();
        loc.getSpeed();
        Latitude=loc.getLatitude();  
        Longitude=loc.getLongitude();  
        Altitude=loc.getAltitude();  
        Speed=loc.getSpeed();  
    }  
  
    @Override  
    public void onProviderDisabled(String provider)  
    {  
    	Latitude=0;  
        Longitude=0;  
        Altitude=0;  
        Speed=0;   
    }  
    @Override  
    public void onProviderEnabled(String provider)  
    {  
        //print "GPS got Enabled";  
    }  
    @Override  
    public void onStatusChanged(String provider, int status, Bundle extras)  
    {  
    }  
}  